/**********************************************************/
/* Goblin Defense - A tower defense game for Wii Homebrew */
/* Copyright (C) 2009 Ricardo Bueno Cordeiro              */
/* Licensed under de GNU General Public License v2.0      */
/*   See license_gplv2.txt for detalis                    */
/**********************************************************/

#include <gccore.h>

#include "pony.h"
#include "path.h"
#include "draw.h"
#include "random.h"

#include "ponies/pony_normal.h"

Pony::Pony(PATH *p) {
	this->path = p;

	path_new_pos(this->path, &this->pos);

	path_get_coordinates(this->path, &this->pos, &this->x, &this->y);
	this->x_pertubation = ((f32)(generate() % 11)) - 5.0;
	this->y_pertubation = ((f32)(generate() % 11)) - 5.0;
}

void Pony::advance(u32 steps) {
	while (steps--)
		path_advance_1_step(this->path, &this->pos);
	path_get_coordinates(this->path, &this->pos, &this->x, &this->y);
}
